import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../tworouter/home.vue'
import nav from '../tworouter/nav.vue'
import one from '../tworouter/one.vue'
Vue.use(VueRouter)

const routes = [
   {
    path: '/',
    name: 'home',
    component: home,
     },
     {
      path: '/nav',
      name: 'nav',
      component: nav,
      children:[
        {
          path: 'one',
          name: 'one',
          component: one
        }
      ]
     }
    
]

const router = new VueRouter({
  routes
})

export default router
